bitkeeper revision 1.799 (4055d1bd4oP9eNVVeSlvvnj5F9We2w)
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Mon, 15 Mar 2004 15:54:37 +0000 (15:54 +0000)
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Mon, 15 Mar 2004 15:54:37 +0000 (15:54 +0000)
utils.c, Xc.c:
  Fix building with Python 2.2.

tools/xc/py/Xc.c
tools/xend/lib/utils.c

index 124942bbb0271bce6dbe570b9c6deefaf703edd7..8ed16ee5051a93ebc5b1bb0e93fcf96bd3bb5a33 100644 (file)
@@ -7,6 +7,11 @@
 #include <Python.h>
 #include <xc.h>
 
+/* Needed for Python versions earlier than 2.3. */
+#ifndef PyMODINIT_FUNC
+#define PyMODINIT_FUNC DL_EXPORT(void)
+#endif
+
 static PyObject *xc_error, *zero;
 
 typedef struct {
index de832a1761ae7258bee06fe48cbea0b394c8668a..c5954043d61babf229a8ca21ae37f10d9d394447 100644 (file)
 #include <xc.h>
 #include <asm-xeno/control_if.h>
 
+/* Needed for Python versions earlier than 2.3. */
+#ifndef PyMODINIT_FUNC
+#define PyMODINIT_FUNC DL_EXPORT(void)
+#endif
+
 /* NB. The following should be kept in sync with the kernel's evtchn driver. */
 #define EVTCHN_DEV_NAME  "/dev/xen/evtchn"
 #define EVTCHN_DEV_MAJOR 10